<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>san-core Spec Runner</title>

    <link rel="shortcut icon" type="image/png" href="../node_modules/jasmine-core/images/jasmine_favicon.png">
    <link rel="stylesheet" href="../node_modules/jasmine-core/lib/jasmine-core/jasmine.css">

    <script src="../node_modules/jasmine-core/lib/jasmine-core/jasmine.js"></script>
    <script src="../node_modules/jasmine-core/lib/jasmine-core/jasmine-html.js"></script>
    <script src="../node_modules/jasmine-core/lib/jasmine-core/boot.js"></script>

    <!-- include triggerEvent  -->
    <script src="e2e/wdio-bridge.js"></script>
    <script src="lib/triggerEvent.js"></script>

    <!-- include source files here... -->
    <script src="../dist/san.spa.dev.js"></script>
    <script src="lib/esl.js"></script>
    <script>
    require.config({
        paths: {
            san: '../dist/san'
        }
    });

    (function () {
        var boot = window.onload;
        window.onload = function () {
            require(['san'], boot);
        };
    })();

    describe("Conflict", function () {

        it("different san instance should not gen same id element", function () {
            var MyComponent = san.defineComponent({
                template: '<b>aaa</b>'
            });

            var MyComponent2 = require('san').defineComponent({
                template: '<b>aaa2</b>'
            });

            var myComponent = new MyComponent();
            var myComponent2 = new MyComponent2();

            var wrap = document.createElement('div');
            document.body.appendChild(wrap);
            myComponent.attach(wrap);
            myComponent2.attach(wrap);

            var bs = wrap.getElementsByTagName('b');
            expect(!bs[0].id || bs[0].id !== bs[1].id).toBeTruthy();

            myComponent.dispose();
            myComponent2.dispose();
            document.body.removeChild(wrap);
        });
    });
    </script>

    <!-- include spec files here... -->

    <script src="nextTick.spec.js"></script>
    <script src="expr.spec.js"></script>
    <script src="expr-update.spec.js"></script>
    <script src="element.spec.js"></script>
    <script src="interpolation.spec.js"></script>
    <script src="if-directive.spec.js"></script>
    <script src="for-directive.spec.js"></script>
    <script src="component.spec.js"></script>
    <script src="element-event.spec.js"></script>
    <script src="form-bindx.spec.js"></script>
    <script src="component-bindx.spec.js"></script>
    <script src="slot.spec.js"></script>
    <script src="template.spec.js"></script>
    <script src="transition.spec.js"></script>

    <script src="data-types.spec.js"></script>
    <script src="svg-element.spec.js"></script>
    <script src="parse-template-error.spec.js"></script>
</head>

<body>
</body>
</html>

